package org.jflame.web;

import org.jflame.commons.config.ConfigReader;

import jakarta.servlet.ServletConfig;

public class ServletParamConfig extends ConfigReader {

    private ServletConfig servletConfig;

    public ServletParamConfig(ServletConfig servletConfig) {
        this.servletConfig = servletConfig;
    }

    @Override
    public boolean hasKey(String key) {
        return servletConfig.getInitParameter(key) == null;
    }

    @Override
    public String getValue(String configKey) {
        return servletConfig.getInitParameter(configKey);
    }

}
